<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>{$website['name']|default=''|htmlentities} – {$site.name|htmlentities}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="{$website['keywords']|htmlentities}">
    <meta name="description" content="{$website['description']|htmlentities}">
    <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
    <link href="/assets/css/frontend.css" rel="stylesheet">
    <link href="/assets/css/common.css" rel="stylesheet">
    <script type="text/javascript">
        var require = {
            config: JSON.parse('{$config|json_encode}')
        };
    </script>
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
    <script src="__CDN__/assets/js/html5shiv.js"></script>
    <script src="__CDN__/assets/js/respond.min.js"></script>
    <![endif]-->
    <style>body{padding-top: 0 !important;}

        .active{border:1px solid #fc8939 !important;}
        .active i{color:#fc8939!important;}
    </style>
</head>
<body>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="t" value="{$t}">
    <input type="hidden" name="id" value="{$id}">
    <input type="hidden" name="c" value="{$c}">
    {eq name="c" value="comment"}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('发表评论')}:</label>
        <div class="col-xs-12 col-sm-9">
            <textarea class="form-control" name="content" data-rule="required"></textarea>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-9">
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
    {/eq}
    {eq name="c" value="flag"}
    <div style="display:flex;flex-direction: column; align-items: center;">
            {elt name="nums" value="0"}
        <div>你今日的旗子已用完</div>
        {else/}
            <div style="line-height:26px; font-size:16px;color:#000;">给作者赠送旗帜</div>
            <div style="line-height:22px;font-size: 14px;color:#666">帖子旗帜越多，越容易被管理员加精</div>
            <div style="display: flex;align-items: center;">
                {for start="0" end="$limit_flag"} 
                <div style="background:#fff;flex:1;display: flex; flex-direction: column; align-items: center; margin:10px 5px;padding:5px;border: 1px dashed #666; border-radius: 3px;" data-nums="{$i+1}" class="flag {eq name='i' value='0'} active {/eq}">
                    <div style="font-size: 16px; color:#000">{$i+1}旗帜</div>
                    <div style="padding:10px;">
                        <i class="fa fa-font-awesome" style="font-size: 30px;"></i>
                    </div>
                    <div style="color:#666;font-size: 14px;">{eq name="i" value="0"}有所启发{/eq}{eq name="i" value="1"}受益匪浅{/eq}{eq name="i" value="2"}醍醐灌顶{/eq}</div>
                </div>
                
                {/for}
                <input type="hidden" name="nums" value="1">
            </div>
            <div style="line-height:20px;font-size: 14px;color:#666">当前剩余旗帜：{$nums}</div>
            <div style="line-height:20px;font-size: 14px;color:#666">次日凌晨将清空未用旗帜</div>
            <div style="margin-top:20px;">
                <button type="submit" class="btn btn-success">赠送旗帜</button>
            </div>
        {/elt}
    </div>
    {/eq}
</form>
<script src="/assets/js/require.js" data-main="/assets/js/require-frontend.js?v={$site.version|htmlentities}"></script>
</body>
</html>